From 5c735899be4d4d30d6552ef8c4f716e82d8eb69d Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 4 Sep 2022 21:50:55 +0000
Subject: [PATCH] disable aarch64 neon stuff for now

The NEON stuff fails to build with Clang for the time being.

Upstream issue: https://github.com/openzfs/zfs/issues/13260
---
 module/zcommon/Makefile.in    | 1 -
 module/zcommon/zfs_fletcher.c | 2 +-
 module/zfs/Makefile.in        | 3 ---
 module/zfs/vdev_raidz_math.c  | 2 +-
 4 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/module/zcommon/Makefile.in b/module/zcommon/Makefile.in
index ebc5384..baee969 100644
--- a/module/zcommon/Makefile.in
+++ b/module/zcommon/Makefile.in
@@ -25,4 +25,3 @@ $(MODULE)-objs += zprop_common.o
 $(MODULE)-$(CONFIG_X86) += zfs_fletcher_intel.o
 $(MODULE)-$(CONFIG_X86) += zfs_fletcher_sse.o
 $(MODULE)-$(CONFIG_X86) += zfs_fletcher_avx512.o
-$(MODULE)-$(CONFIG_ARM64) += zfs_fletcher_aarch64_neon.o
diff --git a/module/zcommon/zfs_fletcher.c b/module/zcommon/zfs_fletcher.c
index 7a9de4a..3f1ddb5 100644
--- a/module/zcommon/zfs_fletcher.c
+++ b/module/zcommon/zfs_fletcher.c
@@ -187,7 +187,7 @@ static const fletcher_4_ops_t *fletcher_4_impls[] = {
 #if defined(__x86_64) && defined(HAVE_AVX512BW)
 	&fletcher_4_avx512bw_ops,
 #endif
-#if defined(__aarch64__) && !defined(__FreeBSD__)
+#if 0
 	&fletcher_4_aarch64_neon_ops,
 #endif
 };
diff --git a/module/zfs/Makefile.in b/module/zfs/Makefile.in
index 653ea0d..64ac0a8 100644
--- a/module/zfs/Makefile.in
+++ b/module/zfs/Makefile.in
@@ -144,9 +144,6 @@ $(MODULE)-$(CONFIG_X86) += vdev_raidz_math_avx2.o
 $(MODULE)-$(CONFIG_X86) += vdev_raidz_math_avx512f.o
 $(MODULE)-$(CONFIG_X86) += vdev_raidz_math_avx512bw.o
 
-$(MODULE)-$(CONFIG_ARM64) += vdev_raidz_math_aarch64_neon.o
-$(MODULE)-$(CONFIG_ARM64) += vdev_raidz_math_aarch64_neonx2.o
-
 $(MODULE)-$(CONFIG_PPC) += vdev_raidz_math_powerpc_altivec.o
 $(MODULE)-$(CONFIG_PPC64) += vdev_raidz_math_powerpc_altivec.o
 
diff --git a/module/zfs/vdev_raidz_math.c b/module/zfs/vdev_raidz_math.c
index 2ce0dc5..073ef58 100644
--- a/module/zfs/vdev_raidz_math.c
+++ b/module/zfs/vdev_raidz_math.c
@@ -61,7 +61,7 @@ const raidz_impl_ops_t *raidz_all_maths[] = {
 #if defined(__x86_64) && defined(HAVE_AVX512BW)	/* only x86_64 for now */
 	&vdev_raidz_avx512bw_impl,
 #endif
-#if defined(__aarch64__) && !defined(__FreeBSD__)
+#if 0
 	&vdev_raidz_aarch64_neon_impl,
 	&vdev_raidz_aarch64_neonx2_impl,
 #endif
-- 
2.34.1

